package com.yoyo.yyadsdk.open;

import android.content.Context;
import android.content.Intent;
import android.content.pm.IPackageInstallObserver;

public class MyPackageInstallObserver extends IPackageInstallObserver.Stub {
    private Context mContext;

    public MyPackageInstallObserver(Context context) {
        mContext = context;
    }

    @Override
    public void packageInstalled(String packageName, int returnCode) {
        // 返回1代表安装成功
        if (returnCode == 1) {
            Intent intent = new Intent("com.yoyo.yyadsdk.broad.StartBroadcastReceiver");
            mContext.sendBroadcast(intent);
        }
    }
}